<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>九九乘法表</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        h1 {
            color: #333;
            margin-bottom: 20px;
        }
        .multiplication-table {
            width: 80%;
            max-width: 600px;
        }
        .row {
            margin: 5px 0;
            padding: 5px;
        }
        .odd-row {
            background-color: #f0f0f0;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <h1>九九乘法表</h1>
    <div id="multiplicationTable" class="multiplication-table"></div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const table = document.getElementById('multiplicationTable');

            for (let i = 1; i <= 9; i++) {
                const row = document.createElement('div');
                row.className = 'row';
                if (i % 2 !== 0) {
                    row.classList.add('odd-row');
                }

                let rowContent = '';
                for (let j = 1; j <= i; j++) {
                    rowContent += `${j}*${i}=${j*i} `;
                }
                row.innerHTML = rowContent.replace(/ /g, '&nbsp;');
                table.appendChild(row);
            }
        });
    </script>
</body>
</html>